/* vue */
import { defineComponent } from "vue";
/* mixin */
import VersionControlBaseMixin from '@src/mixins/versionControlMixin/base';
/* version event */
import {
  isShowEventModule,
  isShowEventConvertTask,
  isShowEventTypeSettingCard,
} from '@shb-lib/version'

export default defineComponent({
  name: "version-control-event-mixin",
  mixins: [VersionControlBaseMixin],
  computed: {
    /** 
     * @description 事件模块 版本控制
    */
    eventVersionControl(): Record<string, boolean> {
      return {
        isShowEventConvertTask: isShowEventConvertTask(this._versionControlMap),
        /** 
         * @description 事件支持附加组件卡片，不需要版本控制
        */
        isShowEventTypeSettingCard: true,
        isShowEventModule: isShowEventModule(this._versionControlMap)
      }
    },
    _isShowEventConvertTask(): boolean {
      return this.eventVersionControl.isShowEventConvertTask
    },
    _isShowEventTypeSettingCard(): boolean {
      return this.eventVersionControl.isShowEventTypeSettingCard
    },
    _isShowEventModule(): boolean {
      return this.eventVersionControl.isShowEventModule
    }
  }
})
